package cn.edu.sgu.www.mhxysy.dto.children;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class ChildrenZizhiDTO implements DataTransferObject {

	/**
	 * 攻击资质
	 */
	@Positive(message = "攻击资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "攻击资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "攻击资质", required = true)
	private Integer gjzz;

	/**
	 * 防御资质
	 */
	@Positive(message = "防御资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "防御资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "防御资质", required = true)
	private Integer fyzz;

	/**
	 * 体力资质
	 */
	@Positive(message = "体力资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "体力资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "体力资质", required = true)
	private Integer tlzz;

	/**
	 * 法力资质
	 */
	@Positive(message = "法力资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "法力资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "法力资质", required = true)
	private Integer flzz;

	/**
	 * 速度资质
	 */
	@Positive(message = "速度资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "速度资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "速度资质", required = true)
	private Integer sdzz;

	/**
	 * 子女成长
	 */
	@Range(min = 0, max = 1300, message = "子女成长" + CustomMessages.ILLEGAL)
	@NotNull(message = "子女成长" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "子女成长", required = true)
	private Integer chengzhang;

	/**
	 * 子女ID
	 */
	@Pattern(regexp = RegExps.CHILDREN_ID, message = "子女ID" + CustomMessages.ILLEGAL)
	@NotBlank(message = "子女" + CustomMessages.ID_NOT_NULL)
	@ApiModelProperty(value = "子女ID", required = true)
	private String childrenId;
}